package com.njtoyo.taxi.admin.rest.presenter.business.ride;

import com.njtoyo.taxi.admin.mapper.master.enums.*;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


@Data
public class RideListPresenter implements Serializable {
    private Long id;
    private Long callId;
    private String callType;
    private String callOriginName;
    private Boolean needPrepay;
    private String callDestinationName;
    private String originName;
    private String destinationName;
    private RideStateState state;
    private RidePlatform platform;
    private RideCategory category;
    private Date createdAt;
    private Date updatedAt;
    private Boolean hasOnline;
    private Taxi taxi;
    private Boolean partialRefund = false;//是否部分退款

    @Data
    @Accessors(chain = true)
    public static class Taxi {
        private Long id;
        private String plateNumber;
    }

    private Driver driver;

    @Data
    @Accessors(chain = true)
    public static class Driver {
        private Long id;
        private String name;
        private String mobileNumber;
    }

    private User user;

    @Data
    @Accessors(chain = true)
    public static class User {
        private Long id;
        private String name;
        private String mobileNumber;
    }

    private Company company;

    @Data
    @Accessors(chain = true)
    public static class Company {
        private Long id;
        private String name;
    }

    private Area area;

    @Data
    @Accessors(chain = true)
    public static class Area {
        private Long id;
        private String name;
    }

    private City city;

    @Data
    @Accessors(chain = true)
    public static class City {
        private Long id;
        private String name;
    }

    private Canton canton;

    @Data
    @Accessors(chain = true)
    public static class Canton {
        private Long id;
        private String name;
    }

    private RideOrder rideOrder;

    @Data
    @Accessors(chain = true)
    public static class RideOrder {
        private Long id;
        private BigDecimal amount;
        private RideOrderPaidThrough presetThrough;
        private RideOrderPaidThrough paidThrough;
        private RideOrderState state;
        private Boolean refunded;
    }

    private RideCancellation rideCancellation;

    @Data
    @Accessors(chain = true)
    public static class RideCancellation {
        private Long id;
        private Long rideId;
        private RideCancellationTriggerBy triggerBy;
        private RideCancellationResponsibility responsibility;
        private RideCancellationViolate violate;
        private CancellationOrder cancellationOrder;
    }


    @Data
    @Accessors(chain = true)
    public static class CancellationOrder {
        private Long id;
        private String number;
        private String outTradeNumber;
        private BigDecimal amount;
        private RideOrderPaidThrough paidThrough;
        private BigDecimal farePaid;
        private BigDecimal balancePaid;
        private RideOrderState state;
        private Boolean refunded;
        private Date createdAt;
        private Date updatedAt;
    }

}
